import React, {Component} from 'react';
import {Layout} from 'antd';
import LeftNav from '../../components/left-nav';
import Header from '../../components/header';
import {Redirect,Route, Switch} from 'react-router-dom';
import ComInformation from '../com_information/com_information';
import EmpInformation from '../emp_information/emp_information';
import Message from '../message/message';
import Recharge from '../recharge/recharge';
import Employee from '../recruit/employee';
import Order from '../recruit/order';
import RecruitInformation from '../recruit/recruit_information';
import AddRecruitInformation from '../recruit/recruit_information_add';
import UpdateComInformation from '../com_information/com_information_update';



const {Footer, Sider, Content} = Layout;
/*
* 后台主页的路由组件*/
export default class Admin extends Component {
    render() {
        return (
            <Layout style={{height: "100%"}}>
                <Sider>
                    <LeftNav/>
                </Sider>
                <Layout>
                    <Header/>
                    <Content style={{margin:20, backgroundColor: '#fff'}}>
                        <Switch>
                            <Route path='/com_information' component={ComInformation}/>
                            <Route path='/emp_information' component={EmpInformation}/>
                            <Route path='/message' component={Message}/>
                            <Route path='/recharge' component={Recharge}/>
                            <Route path='/recruit/employee' component={Employee}/>
                            <Route path='/recruit/order' component={Order}/>
                            <Route path='/recruit/recruit_information' component={RecruitInformation}/>
                            <Route path='/recruit/add_recruit_information' component={AddRecruitInformation}/>
                            <Route path='/update_com_information' component={UpdateComInformation}/>
                            <Redirect to='/com_information'/>
                        </Switch>
                    </Content>
                    <Footer style={{textAlign: 'center'}}>南京德利文瑞网络科技有限公司提供</Footer>
                </Layout>
            </Layout>
        )
    }
}